// import { RouteConfig } from 'react-router-config';

import { IRouteViewProps } from './RouteView';


import { lazy } from "react";
const routes: Array<IRouteViewProps> = [

    {
        path: "/login",
        component: lazy(() => import("../modules/login/Login")),
        exact: true, // 强匹配
        isAuth: false,
    },
    {
        path: "/home",
        component: lazy(() => import("../modules/head/head")),
        isAuth: false,
        children: [
            {
                path: "/home/layout",
                component: lazy(() => import("../modules/layout/index")),
                isAuth: false,
                exact: true, // 强匹配
            },
            {
                path: "/home/menu",
                component: lazy(() => import("../modules/menu/MenuList")),
                isAuth: false,
                children: [
                    {
                        path: "/home/menu/page1",
                        component: lazy(() => import("../page/page1")),
                        isAuth: false,
                    },
                    {
                        path: "/home/menu/page2",
                        component: lazy(() => import("../page/page2")),
                        isAuth: false,

                    },
                ]
            },
        ]
    },

    {
        path: "/404",
        component: lazy(() => import("../modules/404/404")),
    },

    {
        path: "/",
        redirect: "/login",
    },
    {
        path: "/*",
        component: lazy(() => import("../modules/404/404")),
    },
];

export default routes;